import java.util.Arrays;


public class Test {
	
	public static void main(String[] args){
		int[] a = new int[]{12,345,324,657,34,8,24,856,23,4};
		showArray(a);
		sort(a);
		showArray(a);
	}
	private static void sort(int[] a){
		
	}
	private static void showArray(int[] a){
		for(int i = 0;i<a.length;i++){
			int tem = i;
		      for(int j=i;j<a.length;j++) {
	                if(a[j] < a[tem]) {
	                    tem = j;
	                }
	            }
	            int temp1 = a[i];
	            a[i] = a[tem];
	            a[tem] = temp1;
	        }
	        System.out.println(Arrays.toString(a));
			
			
		}
	         
	}
